import request from '@/utils/request';
// 获取供应商下拉列表
export function getSupplierList() {
    return request({
        url: '/basic/system/basicSupplierInfo/supplierList',
        method: 'get'
    })
}

// 导出供应商信息列表
export function exportSupplierList(data) {
    return request({
        url: '/basic/system/basicSupplierInfo/export',
        method: 'post',
        data: data
    })
}

// 获取供应商类型下拉列表
export function getSupplierTypeDict() {
    return request({
        url: '/basic/system/basicSupplierInfo/getSupplierTypeDictList',
        method: 'get'
    })
}

// 查询供应商信息列表
export function listSupplierInfo(query) {
    return request({
        url: '/basic/system/basicSupplierInfo/list',
        method: 'get',
        params: query
    })
}

// 获取供应商详细信息
export function getSupplierDetail(supplierId) {
    return request({
        url: `/basic/system/basicSupplierInfo/${supplierId}`,
        method: 'get'
    })
}

// 新增供应商信息
export function addSupplierInfo(data) {
    return request({
        url: '/basic/system/basicSupplierInfo',
        method: 'post',
        data: data
    })
}

// 修改供应商信息
export function updateSupplierInfo(data) {
    return request({
        url: '/basic/system/basicSupplierInfo',
        method: 'put',
        data: data
    })
}

// 删除供应商信息
export function deleteSupplierInfo(supplierId) {
    return request({
        url: `/basic/system/basicSupplierInfo/${supplierId}`,
        method: 'delete'
    })
}